package com.weixing.mall.provider.api.fallback;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.provider.api.model.dto.AfterOrderImgDto;
import com.weixing.mall.provider.api.model.dto.OrderSettleDto;
import com.weixing.mall.provider.api.model.dto.SeckillOrderDto;
import com.weixing.mall.provider.api.model.dto.SeckillOrderImportDto;
import com.weixing.mall.provider.api.model.enums.OrderTypeEnum;
import com.weixing.mall.provider.api.model.vo.*;
import com.weixing.mall.provider.api.service.OrderServiceRpc;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author wx
 * @Date 2019/11/28 11:46
 * @Version 1.0
 */
@Component
public class OrderServiceFallback implements OrderServiceRpc {
    @Override
    public OrderTypeEnum selectByAgentSn(String orderSn) {
        return null;
    }

    @Override
    public List<SealingSheetOrderVo> sealingSheetOrderList() {
        return null;
    }

    @Override
    public Result updateStatus(Long id, Integer status) {
        return null;
    }

    @Override
    public Result<OrderItemVo> selectById(Long id) {
        return null;
    }

    @Override
    public Result saveAfterOrderImg(AfterOrderImgDto afterOrderImgDto) {
        return null;
    }



    @Override
    public int getCountfrontOrder(Long memberId, Integer frontOrderStatus) {
        return 0;
    }

    @Override
    public List<TransferListVo> byDepotId(Long depotId) {
        return null;
    }

    @Override
    public Result updateOrderStatusS(Integer depotId) {
        return null;
    }

    @Override
    public Result orderSettleNotify(Long orderId) {
        System.out.println("进入熔断");
        return ResultUtil.error("服务不可用");
    }

    @Override
    public Result updateAfterSaleStatus(Long id, Integer type, Long operatorId, String operatorName) {
        return ResultUtil.error("服务不可用");
    }

    @Override
    public Result updateDepotInfo(Long id, String depotSn, String depotLocation, String depotOrder) {
        return ResultUtil.error("服务不可用");
    }

    @Override
    public Result<List<ActOrderSettleVo>> selectAgentActOrdersByActId(Long actId) {
        return ResultUtil.error();
    }

    @Override
    public Result executeSeckillOrderImport(SeckillOrderDto seckillOrderDto) {
        return ResultUtil.error("秒杀订单导入失败");
    }

    @Override
    public Result actOrderSettleNotify(List<Long> orderIds) {
        return ResultUtil.error("跟新订单失败");
    }


    @Override
    public OrderGoodItvmVo getOrderGoodById(Long orderId) {
        return null;
    }

    @Override
    public Result<List<Long>> executeAuditOrderTask() {
        return ResultUtil.error("订单服务不可用");
    }

    @Override
    public Result autoConfirmOrder() {
        return ResultUtil.error("failed");
    }

    @Override
    public Result cancelOrder(long orderId) {
        return ResultUtil.error("取消订单失败");
    }

    @Override
    public Result checkHasAuditOrder(long agentId) {
        return ResultUtil.error("订单服务不可用");
    }

    @Override
    public Result updateTag(Long orderId, Integer sysTag, Integer appTag) {
        return ResultUtil.error("订单服务不可用");
    }

    @Override
    public Result getAgentRuleData(Long agentId, String startTime, String endTime) {
        return ResultUtil.error("订单服务不可用");
    }

    @Override
    public Result<Integer> checkMemberOrderByMemberId(long memberId) {
        return ResultUtil.error("订单服务不可用");
    }

    @Override
    public Result executeSeckillOrderImport4kefu(SeckillOrderDto orderDto) {
        return ResultUtil.error("秒杀订单导入失败");
    }
}
